package com.tbit.uqbike.client.ordertrace;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Objects;

/**
 * 订单事件
 *
 * @author <a href="mailto:chen.chaoxiong@tbit.com.cn">ChenChaoXiong</a>
 * @since 2024/7/2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Event {

    public Event(String eventType) {
        this.eventType = eventType;
        this.data = null;
    }

    private String eventType;

    private String data;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Event event = (Event) o;
        return Objects.equals(eventType, event.eventType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(eventType);
    }
}
